package hoja4;


import java.util.AbstractList;

interface Vector<E> extends AbstractList implements Cloneable{
// pre: initialCapacity >= 0
// post: constructs an empty vector with initialCapacity capacity
abstract public void add(Object obj);
// post: adds new element to end of possibly extended vector
abstract public Object remove(Object element);
// post: element equal to parameter is removed and returned
abstract public Object get(int index);
// pre: 0 <= index && index < size()
// post: returns the element stored in location index
abstract public void add(int index, Object obj);
// pre: 0 <= index <= size()
// post: inserts new value in vector with desired index,
// moving elements from index to size()-1 to right
abstract public boolean isEmpty();
// post: returns true iff there are no elements in the vector
abstract public Object remove(int where);
// pre: 0 <= where && where < size()
// post: indicated element is removed, size decreases by 1
abstract public Object set(int index, Object obj);
// pre: 0 <= index && index < size()
// post: element value is changed to obj; old value is returned
abstract public int size();
// post: returns the size of the vector
}
